const home = require('./routes/home')
const page = require('./routes/page')
const Router = require('koa-router')
module.exports = (app) => {
    // 装载所有子路由
    let router = new Router()
    router.use('/', home.routes(), home.allowedMethods())
    router.use('/page', page.routes(), page.allowedMethods())

    // 加载路由中间件
    app.use(router.routes()).use(router.allowedMethods())
}